<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Language" content="zh-CN" />
	<title>高清视频发布和管理平台</title>
	<meta name="author" content="Jovan" />
	<meta name="Creation-Date" content="" />
	<meta name="robots" content="index,follow" />
	<meta name="Keywords" content="" />
	<meta name="Description" content="" />
	<link rel="stylesheet" type="text/css" href="/styles/base.css" media="all" />
	<link rel="stylesheet" type="text/css" href="/styles/login.css" media="all"/>
	<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
	<script type="text/javascript">
	<!--
		$(document).ready(function(){
			var _top = (document.documentElement.clientHeight-400)/2;
			$("#loginLogo img").css( 'margin-top',_top + 'px' );
            if (top.location != self.location)
            {
                top.location=self.location;
            }
            $("#username").focus();
            $("#validateimg").click(function(){
                var d = new Date();
                $(this).attr('src', '/index/cap/code.png?t='+d.getUTCHours().toString()+d.getUTCMinutes().toString()+d.getUTCSeconds().toString()+'.'+d.getUTCMilliseconds().toString());
            });
            $("#myform").submit(function(){
                if (''==$('#username').val()) {
                    $("#username").focus();
                    $("#username").select();
                    return false;
                }
                else if (''==$('#password').val()) {
                    $("#password").focus();
                    $("#password").select();
                    return false;
                }
                else if (4>$('#validatecode').val().length||'×'==$('#validatestatus').html()) {
                    $('#validatestatus').html('');
                    $("#validatecode").focus();
                    $("#validatecode").select();
                    return false;
                }
                return true;
            });
            $("#validatecode").blur(function(){
                $.ajax(
                {
                    url: '/index/ajax/type/validate/validatecode/'+$(this).val()+'/',
                    cache: false,
                    success: function(html)
	                {
                        if ('succ'==html) {
                            $('#validatestatus').css('font-size', '16');
                            $('#validatestatus').css('color', 'green');
                            $('#validatestatus').html('√');
                        }
                        else if ('reload'==html) {
                            var d = new Date();
                            $('#validateimg').attr('src', '/index/cap/code.png?t='+d.getUTCHours().toString()+d.getUTCMinutes().toString()+d.getUTCSeconds().toString()+'.'+d.getUTCMilliseconds().toString());
                        }
                        else {
                            $('#validatestatus').css('font-size', '16');
                            $('#validatestatus').css('color', 'red');
                            $('#validatestatus').html('×');
                        }
                    }
                });
            });
		});
	//-->
	</script>
</head>
  <body>
	<div class="loginContainer">
		<div id="loginLogo"><img src="/images/loginLogo.jpg" /></div>
		<div class="loginBar">
			<div class="loginStage">
				<form id="myform" name="myform" method="post" action="/index/login/">
					<div class="frmItm">
						<label>用户名</label>
						<cite><input name="username" type="text" id="username" style='width:140px;' maxlength="50" value="" /></cite>
					</div>
					<div class="frmItm">
						<label>密　码</label>
						<cite><input name="password" type="password" id="password" style='width:140px;' maxlength="50" value="" /></cite>
						<input type="hidden" name="cookietime" value="0" />
						<input type="hidden" name="forward" value="">
					</div>
					<div class="frmItm">
						<label>验证码</label>
						<cite><input name="validatecode" type="text" id="validatecode" style='width:70px;' maxlength="4" value="" /><span id='validatestatus' ></span><img id="validateimg" src="/index/cap/code.png?t=$time" style="cursor:pointer;" title="看不清？点击更换一张" /></cite>
					</div>
					<div class="frmBtnLogin"><input name="" type="submit" id=""value="　　" /></div>
				</form>
			</div>
		</div>
		{template 'footer.html'}
	</div>
  </body>
</html>